打印5行五列星星

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
	<script type="text/javascript">
		//打印五行星星
		var str = '';
		for (var i = 1; i <= 5; i ++){//外行负责打印五行
			for (var j = 1; j <= 5; j ++){//里层循环负责一行打印五个星星
				str = str + '*';
			}
			//如果一行打印完毕5个星星就要另起一行，加\n
			str = str + '\n';
		}
		console.log(str);
	</script>
</body>
</html>